#include "mainwindow.h"
#include <QApplication>

#include "qhttphelper.h"

#include <QDebug>


#define LOG()  qDebug() << __FILE__ << __LINE__ << "::"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    QHttpHelper httpget;
    LOG()  << httpget.syncGet(QString("https://www.baidu.com"));

    httpget.asyncGet(QString("https://www.baidu.com"),QStringList(),[&](QByteArray rec){
        LOG() << QObject::tr("此处可以解析 接受到的内容") << rec;
    });

    return a.exec();
}
